<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <div class="box">

    </div>
    <script>
        var n = location.href.indexOf('?');
        var str = location.href.substring(n + 1);
        fetch(`/xiang?${str}`).then(function (data) {
            return data.json();
        }).then(function (res) {
            console.log(res);
            var{ title,content} = res.data[0];
            var str2 = `
            <h2>${title}</h2>
            div${content}</div>
            `;
            document.querySelector('.box').innerHTML = str2;
        })
    </script>
</body>

</html>